//
//  TT_IMManager.h
//  BaseProject
//
//  Created by 王洋 on 2020/4/28.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "TUIKit.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TT_IMManager : NSObject


+ (instancetype)sharedInstance;

//初始化SDK
- (void)TTIM_InitSDK;

/**
*  登录
*
*  @param param 登录参数
*  @param succ  成功回调
*  @param fail  失败回调
*
*  @return 0 请求成功
*/
- (int)TTIM_Login:(TIMLoginParam*)param succ:(TIMLoginSucc)succ fail:(TIMFail)fail;

/**
*  登出
*
*  @param succ 成功回调，登出成功
*  @param fail 失败回调，返回错误码和错误信息
*
*  @return 0 发送登出包成功，等待回调
*/
- (int)TTIM_LogOut:(TIMLoginSucc)succ fail:(TIMFail)fail;


/**
*  @param groupId 申请加入的群组Id
*  @param msg   申请消息
*  @param succ  成功回调（申请成功等待审批）
*  @param fail  失败回调
*/
- (void)TTIM_JoinGrop:(NSString *)groupId msg:(NSString*)msg succ:(TIMSucc)succ fail:(TIMFail)fail;


/**
*  @param groupId 群组Id
*  @param succ    成功回调
*  @param fail    失败回调
*/
- (void)TTIM_QuitGroup:(NSString*)groupId succ:(TIMSucc)succ fail:(TIMFail)fail;


- (void)TTIM_GetGroupMenberList:(NSString*)groupId succ:(TIMGroupMemberSucc)succ fail:(TIMFail)fail;


- (void)TTIM_GetUserProfile:(NSArray<NSString *> *)identifiers forceUpdate:(BOOL)forceUpdate succ:(TIMUserProfileArraySucc)succ fail:(TIMFail)fail;


- (void)TTIM_DeleteGroupConversation:(NSString*)groupId;


- (void)TTIM_DeleteConversationAndMessages:(NSString*)groupId;

- (void)TTIM_GetSelfProfile:(TIMGetProfileSucc)succ fail:(TIMFail)fail;;


- (void)TTIM_SetSelfProfile:(NSDictionary *)dic succ:(TIMSucc)succ fail:(TIMFail)fail;


- (int)TTIM_GetUnreadMsgCount;



#pragma mark businessApi
- (void)BA_IMLogin;

@end

NS_ASSUME_NONNULL_END
